package com.wty.codeblock;

/**
 *
 *
 * @Author wangtengyu
 * @Create 2018-08-03-15:43
 */




public class Test2 {
    static{
        System.out.println("父类静态代码块");
    }

    {
        System.out.println("父类构造代码块");
    }

    public Test2() {
        System.out.println("父类构造函数");
    }
    public static void main(String[] args) {
    		Test2 test2=new Test2();
    }
}

class Test3 extends Test2{
    static{
        System.out.println("子类静态代码块");
    }

    {
        System.out.println("子类构造代码块");
    }

    public Test3() {
        System.out.println("子类构造函数");
    }
    public static void main(String[] args) {
        Test3 test3=new Test3();
    }
}



